package dao;


import model.User;

import java.sql.Connection;
import java.util.List;

public interface UserDAO {
    //针对数据库访问
    List<User> getUserList() throws Exception;

    int addUser(User user);

    int updateUser(User user);

    User getUserById(String id);

    List<User> getUserByName(String username);

    void deleteUser(String id);

    User login(String username, String Password);

    int updateUserBalance(Connection con, User user, Integer flag, Double num) throws Exception;
    int updateUserBalance( User user, Integer flag, Double num);

    User getUserByEmail(String email);

}
